package cn.jobstart.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;
import cn.jobstart.pubInter.exception.SkException;
import cn.jobstart.pubInter.IBaseService;
import cn.jobstart.pubInter.RestfulController;
import cn.jobstart.dto.CompanyContactDTO;
import cn.jobstart.dto.CompanyContactPageDTO;
import cn.jobstart.modelExt.CompanyContactExt;
import cn.jobstart.searchExt.CompanyContactSearchExt;
import cn.jobstart.service.ICompanyContactService;
import cn.jobstart.vo.CompanyContactDetailVO;
import cn.jobstart.vo.CompanyContactListVO;
import cn.jobstart.vo.CompanyContactDomainVO;
import cn.jobstart.vo.CompanyContactDetailDomainVO;
import cn.jobstart.export.CompanyContactDomainExport;
import cn.jobstart.controller.ApiManageController;
import org.springframework.validation.annotation.Validated;
import java.util.Set;
import java.util.HashSet;
import cn.jobstart.pubInter.exception.BusinessException;

/**
*    @author sunke
*    @Date 2023-09-06 15:00:20
*    @description CompanyContactController      企业联系人
*/
@Api(tags = "人才管理系统-企业联系人相关", description = "企业联系人相关接口")
@RestController(value ="companyContactRestfulController")
@RequestMapping("/companyContact/")
@Validated
public class CompanyContactController extends ApiManageController<CompanyContactDTO,CompanyContactPageDTO,CompanyContactExt, CompanyContactSearchExt,CompanyContactDomainVO,CompanyContactDetailDomainVO,CompanyContactDetailVO,CompanyContactListVO,String> {

	@Resource(name = "companyContactService")
	private ICompanyContactService companyContactService;



	@Override
	public IBaseService<CompanyContactExt, CompanyContactSearchExt,String> getBaseService() throws SkException {
		return companyContactService;
	}

	@Override
	public String getBaseRoute() {
		return "/companyContact/";
	}

	/**
	* 当前模板名称
	* @return
	*/
	@Override
	public String getModelName(){
		return "企业联系人";
	}

	@Override
	public Class exportExcelClass() {
		return CompanyContactDomainExport.class;
	}

	@Override
	public Set<String> totalMapSet() {
		Set totalMapSet=new HashSet();
		totalMapSet.add("count(company_contact.cc_id) as countNum");
		return totalMapSet;
	}


}